/**
 *Copyright (c) HNA SYSTEMS CO.,LTD
 *
 *@date 2008-10-15
 *
 *Original Author: 陈志钢(zhg_ch)
 *
 *ChangeLog:
 *
 * 
 */
package com.myway.dto.user.domain;
import java.util.HashMap;

/**
 * @author 陈志钢(zhg_ch)
 * 
 * @description
 * 
 * UserStatusConstants 用户状态

 * 
 * @date 2008-10-30
 */
public enum UserStatusConstants {

	ACTV("有效"), DISB("无效");

	/**
	 *  别名
	 */
	private final String alias;
	private static HashMap<String, UserStatusConstants> map = new HashMap<String, UserStatusConstants>();
	

	static {
		for (UserStatusConstants e : UserStatusConstants.values()) {
			map.put(e.alias, e );
		}
	}
	/**
	 * @param alias alias
	 */
	UserStatusConstants(String alias) {
		this.alias=alias;
	}
	/**
	 * @return String
	 */
	@Override
	public String toString() {
		return this.alias;

	}
	
	/**
	 * Return a <code>UserStatusConstants</code> object holding the value of specified alias name
	 * @param alias the alias name of the type
	 * @return a <code>AgentTypeEnum</code> object holding the value represented by the alias name argument
	 */
	public static UserStatusConstants valueOfAlias(String alias) {
		UserStatusConstants type = map.get(alias);

		if (type == null) {
			throw new IllegalArgumentException("Unknown Agent type enum alias [" + alias + "]");
		}

		return type;
	}			
}
